% Define parameters for the sine wave
sound_duration = 2; % Duration in seconds
sound_frequency = 440; % Frequency in Hz (A4 note)

% Create a time vector
sound_t = linspace(0, sound_duration, 44100); % 44100 samples per second for CD-quality audio

% Generate a sine wave
sound_y = sin(2 * pi * sound_frequency * sound_t);

% Play the sound
sound(sound_y, 44100); % Play the sine wave at 44100 samples per second

clear sound_duration sound_frequency sound_t sound_y